package com.ji.service;

import com.ji.dao.EmployeeMapper;
import com.ji.pojo.Department;
import com.ji.pojo.Employee;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmployeeServiceImpl implements EmployeeService{
    @Autowired
    private EmployeeMapper employeeMapper;
    @Override
    public int addEmployee(Employee employee) {
        return employeeMapper.addEmployee (employee);
    }

    @Override
    public int deleteEmployee(int id) {
        return employeeMapper.deleteEmployee (id);
    }

    @Override
    public int updateEmployee(Employee employee) {
        return employeeMapper.updateEmployee (employee);
    }

    @Override
    public List<Employee> queryAllEmployee() {
        return employeeMapper.queryAllEmployee ();
    }

    @Override
    public Employee queryEmployee(int id) {
        return employeeMapper.queryEmployee (id);
    }


}
